#pragma once

enum ClientGroup
{
	ClientGroupBothResources,
	ClientGroupResourceA,
	ClientGroupResourceB
};

class Client
{
protected:
	char m_chPipeName[256];
	ClientGroup m_eGroup;

	HANDLE m_hProcessSemaphore;

	float m_fProcessTime;
	float m_fMinimumModificationTime;
	float m_fMaximumModificationTime;
	float m_fAvarageModificationTime;
	unsigned long m_ulNumModifications;

	bool GetResource(unsigned int index);

public:
	Client(const char* pPipeName, ClientGroup eGroup);
	~Client();

	void Process();
	inline HANDLE GetProcessSemaphore() { return m_hProcessSemaphore; }
	inline ClientGroup GetGroup() { return m_eGroup; }

	void RunThread();

	static DWORD WINAPI ThreadFunction(LPVOID param);

	void PrintRaport();
};

